//
//  UserInfoModel.swift
//  OnceNectar
//
//  Created by 法正磊 on 2018/2/8.
//  Copyright © 2018年 com.inwhoop. All rights reserved.
//

import UIKit
import SwiftyJSON
import MappingAce
// TODO: 都是假数据
struct UserInfoModel: Mapping {
    
    enum ConstellationType: String, Codable {
        /// 魔羯座 (12/22 - 1/19)
        case capricorn = "icon_capricornus"
        
        /// 水瓶座 (1/20 - 2/18)
        case aquarius = "icon_aquarius"
        
        /// 双鱼座 (2/19 - 3/20)
        case pisces = "icon_pisces"
        
        /// 白羊座 (3/21 - 4/20)
        case aries = "icon_aries"
        
        /// 金牛座 (4/21 - 5/20)
        case taurus = "icon_taurus"
        
        /// 双子座 (5/21 - 6/21)
        case gemini = "icon_gemini"
        
        /// 巨蟹座 (6/22 - 7/22)
        case cancer = "icon_cancer"
        
        /// 狮子座 (7/23 - 8/22)
        case leo = "icon_leo"
        
        /// 处女座 (8/23 - 9/22)
        case virgo = "icon_virgo"
        
        /// 天秤座 (9/23 - 10/22)
        case libra = "icon_libra"
        
        /// 天蝎座 (10/23 - 11/21)
        case scorpio = "icon_scorpio"
        
        /// 射手座 (11/22 - 12/21)
        case sagittarius = "icon_sagittarius"
    }
    
    var userId: String?
    /// 名字
    var name: String?
    /// 头像链接
    var haderUrl:String?
    /// 等级
    var level:String?
    /// 星座
    var constellation: String?
    /// 星座图片名
    var constellationType: ConstellationType?
    /// 个人说明
    var introduce: String?
    /// 性别 1男 2女
    var gender :String?
    
    var age : String?
    var birthday :String?
    var concernsAmount : Int?
    var fansAmount : Int?
    var id : String?
    var mobilePhone :String?
    var nickname :String?
    var preferences :Array<Any>?
    var registerTime :String?
    var score : String?
    var sexy :String?
    var status : String?
    var token :String?
    var uuid :String?

    var registrationID :String?

    var username :String?
    var grade :GradeModel?
    var headIcon :String?
    var matchDegree :String?
    var qqBindId :String?
    var weixinBindId :String?
    var weiboBindId :String?

}

extension UserInfoModel{
    
    mutating func initGrade(dic:[String:Any]) {
        grade = GradeModel(fromDic: dic)
    }
}

